package com.java.simple.study.jvm.sugar;

import java.lang.reflect.Method;

/**
 * @author zhoujunlin
 * @date 2022/1/16
 * @desc
 **/
public class B extends A {

    @Override
    public String read() {
        return "eqwe";
    }


    public static void main(String[] args) {

        B b = new B();
        A b1 = (A) b;
        System.out.println(b1.read());


        for (Method m : b1.getClass().getDeclaredMethods()) {
            //public java.lang.Integer com.java.simple.study.jvm.candy.B.read()
            //public java.lang.Number com.java.simple.study.jvm.candy.B.read()
            System.out.println(m);
        }
    }

}
